from fastapi import FastAPI
from app.routers import documents, documents_text, git_service
from app.models import document, document_text
from app.backend.db import engine

document.Base.metadata.create_all(bind=engine)
document_text.Base.metadata.create_all(bind=engine)

app = FastAPI(title="FastAPI text recognition")

@app.get("/", tags=['Welcome to the user interface'])
async def welcome() -> dict:
    return {"message": "My documents app"}

app.include_router(documents.router)
app.include_router(documents_text.router)
app.include_router(git_service.router)